/*
 * Copyright 2012 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package be.free.ts.activity.web;

import be.free.ts.activity.ActivityService;
import be.free.ts.support.requestfactory.GuiceServiceLocator;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

import java.util.Date;
import java.util.List;

/**
 * @author Christophe De Blende
 * @since 02/01/13
 */
@Service(value = ActivityService.class, locator = GuiceServiceLocator.class)
public interface ActivityRequest extends RequestContext {

	Request<List<ActivityProxy>> findByProject(Long projectId);

	Request<List<ActivityProxy>> findByDate(Date dateTime);

	Request<ActivityProxy> save(ActivityProxy entity);

	Request<ActivityProxy> findOne(Long id);

	Request<Boolean> exists(Long id);

	Request<List<ActivityProxy>> findAll();

	Request<List<ActivityProxy>> save(List<ActivityProxy> entities);

	Request<List<ActivityProxy>> findAll(List<Long> ids);

	Request<Long> count();

	Request<Void> delete(Long id);

	Request<Void> delete(ActivityProxy entity);

	Request<Void> delete(List<ActivityProxy> entities);

	Request<Void> deleteAll();

	Request<ActivityProxy> saveAndFlush(ActivityProxy entity);

	Request<List<ActivityProxy>> findAll(int page, int size);

}
